<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() {
        Schema::create('users', function (Blueprint $table) {
            // id
            $table->increments('id');
            // 用户名
            $table->string('name');
            // email
            $table->string('email');
            // 昵称
            $table->string('nick');
            // 密码
            $table->string('password');
            // 头像
            $table->string('avatar');
            // 评分
            $table->integer('score');
            $table->tinyInteger('is_deleted');
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() {
        Schema::dropIfExists('users');
    }
}
